package com.pengli.mytools.retrofit.apiService;

import com.pengli.mytools.beans.dto.baiduyun.CreateDto;
import com.pengli.mytools.beans.dto.baiduyun.PreCreateDto;
import com.pengli.mytools.beans.vo.baiduyun.CreateVo;
import com.pengli.mytools.beans.vo.baiduyun.FileListRespVo;
import com.pengli.mytools.beans.vo.baiduyun.PreCreateVo;
import com.pengli.mytools.beans.vo.baiduyun.UploadByPeaceVo;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.QueryMap;

public interface BaiduYunApiService {
    String filePathInfo = "file";

    //获取云盘根目录文件列表
    @GET(filePathInfo)
    Call<List<FileListRespVo>> getFile(@QueryMap Map<String, String> parm);

    String precreate = "rest/2.0/xpan/file";

    @POST(precreate)
    Call<PreCreateVo> precreate(@QueryMap Map<String, String> parm, @Body PreCreateDto preCreateDto);

    String uploadByPeace = "rest/2.0/pcs/superfile2";

    @Multipart
    @POST(uploadByPeace)
    Call<UploadByPeaceVo> uploadByPeace(@QueryMap Map<String, String> parm, @Part MultipartBody.Part file);


    @POST(precreate)
    Call<CreateVo> create(@QueryMap Map<String, String> parm, @Body CreateDto createDto);


}
